home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form REGFORM
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Registration Form"
- ClientHeight = 2490
- ClientLeft = 1770
- ClientTop = 3375
- ClientWidth = 6780
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 3045
- Icon = REGFORM.FRX:0000
- Left = 1635
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2490
- ScaleWidth = 6780
- Top = 2955
- Width = 7050
- Begin TextBox txt_USERORG
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 1140
- TabIndex = 2
- TabStop = 0 'False
- Text = "Text1"
- Top = 1980
- Width = 3975
- End
- Begin TextBox txt_USERNAME
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 1140
- TabIndex = 0
- TabStop = 0 'False
- Text = "Text1"
- Top = 1500
- Width = 3975
- End
- Begin CommandButton btn_Cancel
- Cancel = -1 'True
- Caption = "&Cancel"
- Height = 495
- Left = 5340
- TabIndex = 3
- TabStop = 0 'False
- Top = 840
- Width = 1215
- End
- Begin CommandButton btn_OK
- Caption = "&OK"
- Height = 495
- Left = 5340
- TabIndex = 1
- TabStop = 0 'False
- Top = 180
- Width = 1215
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Organisation:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 60
- TabIndex = 6
- Top = 2040
- Width = 1035
- End
- Begin Label lbl_Name
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Your Name:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 255
- Left = 60
- TabIndex = 5
- Top = 1560
- Width = 1035
- End
- Begin Label lbl_Title1
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 10.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1155
- Left = 180
- TabIndex = 4
- Top = 180
- Width = 4935
- End
- Begin Image img_Icon
- BorderStyle = 1 'Fixed Single
- Height = 510
- Left = 5700
- Picture = REGFORM.FRX:0302
- Top = 1620
- Width = 510
- End
- Option Explicit
- ' //General variable//
- Dim msg As String
- Sub btn_Cancel_Click ()
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- USERNAME = "UNLICENSED"
- USERORG = "UNLICENSED"
- Unload Me
- End Sub
- Sub btn_OK_Click ()
- ' /* Modified 14/01/95 [GB] */
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- USERNAME = UCase$(txt_USERNAME.Text)
- USERORG = UCase$(txt_USERORG.Text)
- Dim sz_Key As String
- Dim i_RetVal As Integer
- If ISVBRUNNING() = 0 Then
- If EXE = True Then
- sz_Key = InputBox$("Please enter your unique registration code", "REGMAX Registration", "1234567890")
- i_RetVal = PutDataIntoEXE(USERNAME, USERORG, sz_Key)
- End If
- If INI = True Then
- i_RetVal = PutDataIntoINI(USERNAME, USERORG)
- End If
- End If
- ' //Failed Write//
- If (EXE = True) And (i_RetVal > 16) Then
- MsgBox "Unable to Write to this file.", 0, "REGMAX"
- EnableWrites
- End If
- Unload Me
- End Sub
- Sub EnableWrites ()
- ' /* Modified 15/01/95 [GB] */
- ' /* Created 15/01/95 [GB] */
- MainForm!btn_WriteINIData.Enabled = True
- MainForm!btn_WriteRegData.Enabled = True
- MainForm!btn_WriteBoth.Enabled = True
- MainForm!btn_Write_Ext_EXE.Enabled = True
- MainForm!Btn_Write_Ext_INI.Enabled = True
- MainForm!btn_Write_Ext_EXEINI.Enabled = True
- MainForm!Fra_Info(0).Caption = "Wri&te Information"
- MainForm!Fra_Info(2).Caption = "Wr&ite to External EXE"
- End Sub
- Sub Form_Load ()
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- On Error GoTo LOADOUT
- ' //Place the form correctly on the screen//
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
- ' //Initialise this form display//
- InitFrmVars
- ' //Form must be visible for SetFocus to work//
- txt_USERNAME.SelStart = 0
- txt_USERNAME.SelLength = Len(txt_USERNAME.Text)
- txt_USERNAME.SetFocus
- LOADOUT:
- Exit Sub
- End Sub
- Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- MainForm.Show
- End Sub
- Sub InitFrmVars ()
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- msg = "Thank you for purchasing this software. "
- msg = msg & "In order to complete the registration details, please type in the following information,"
- msg = msg & " and then select OK."
- lbl_Title1.Caption = msg
- ' //Initialise for Text Boxes//
- USERNAME = "Gordon Bamber"
- USERORG = "gbamber@mistral.co.uk"
- txt_USERNAME.Text = USERNAME
- txt_USERORG.Text = USERORG
- If EXE Then MsgBox "Unless you have a personal code key, then please accept the default values.", 48, ">> REGMAX Demonstration <<"
- End Sub
- Sub txt_USERNAME_KeyDown (KeyCode As Integer, Shift As Integer)
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- If KeyCode = 13 Or KeyCode = 9 Then
- KeyCode = 0
- USERNAME = txt_USERNAME.Text
- txt_USERORG.SelStart = 0
- txt_USERORG.SelLength = Len(txt_USERORG.Text)
- txt_USERORG.SetFocus
- End If
- End Sub
- Sub txt_USERORG_KeyDown (KeyCode As Integer, Shift As Integer)
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- If KeyCode = 13 Or KeyCode = 9 Then
- KeyCode = 0
- USERORG = txt_USERORG.Text
- Btn_OK.SetFocus
- End If
- End Sub
-